<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:71:"D:\adobe\wamp\www\tp6\public/../application/admin\view\admin\count.html";i:1558321593;s:62:"D:\adobe\wamp\www\tp6\application\admin\view\admin\header.html";i:1557361897;}*/ ?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="/tp6/public/static/bootstrap-3.3.7/css/bootstrap.min.css" />
	<script type="text/javascript" src="/tp6/public/static/js/echarts.min.js"></script>
	<script type="text/javascript" src="/tp6/public/static/js/jquery-3.3.1.min.js"></script>
</head>

<body>

<ul class="breadcrumb">
<li> <a href="<?php echo url('index'); ?>">首页</a></li>
<li><a href="<?php echo url('impo'); ?>">批量导入数据</a></li>
<li><a href="<?php echo url('count'); ?>">统计数据</a></li>
<li><a href="<?php echo url('info'); ?>">详情数据</a></li>
<li><a href="<?php echo url('down'); ?>">导出数据</a></li>
</ul>
<table class="table table-bordered">
 	<tr>
 		<th>序号</th>
 		<th>学院</th>
 		<th>总人数</th>
 		<th>完成人数</th>
 		<th>完成比例</th>
 	</tr>
 	<?php if(is_array($info) || $info instanceof \think\Collection || $info instanceof \think\Paginator): $i = 0; $__LIST__ = $info;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
 	<tr>
		<td><?php echo $i; ?></td>
		<td><?php echo $vo['college']; ?></td>
		<td><?php echo $vo['allnum']; ?></td>
		<td><?php echo $vo['overnum']; ?></td>
		<td><?php echo $vo['pe']; ?></td>
 	</tr>
 	<?php endforeach; endif; else: echo "" ;endif; ?>
</table>

    <center><div id="main" style="width: 1200px;height:400px;"></div></center>

        <script type="text/javascript">
            // 基于准备好的dom，初始化echarts实例
            var myChart = echarts.init(document.getElementById('main'));

            // 指定图表的配置项和数据
            var option = {
                title: {
                    text: '学生完成情况'
                },
                tooltip: {},
                legend: {
                    data:['学生总人数','完成人数']
                },
                xAxis: {
                    data: [<?php if(is_array($info) || $info instanceof \think\Collection || $info instanceof \think\Paginator): $i = 0; $__LIST__ = $info;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>"<?php echo $vo['college']; ?>",<?php endforeach; endif; else: echo "" ;endif; ?>]
                },
                yAxis: {},
                series: [
                    {
                        name: '学生总人数',
                        type: 'bar',
                        barGap: 0,
                        data: [<?php if(is_array($info) || $info instanceof \think\Collection || $info instanceof \think\Paginator): $i = 0; $__LIST__ = $info;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><?php echo $vo['allnum']; ?>,<?php endforeach; endif; else: echo "" ;endif; ?>]
                    },
                    {
                        name: '完成人数',
                        type: 'bar',
                        barGap: 0,
                        data: [<?php if(is_array($info) || $info instanceof \think\Collection || $info instanceof \think\Paginator): $i = 0; $__LIST__ = $info;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><?php echo $vo['overnum']; ?>,<?php endforeach; endif; else: echo "" ;endif; ?>]
                    }
                ]
            };

            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option);
        </script>
</body>
</html>